package com.myapp.struts.menu;

import java.util.ArrayList;

public class GBEveningText {

    private static GBEveningText gbEveningTextObj;
    ArrayList<FoodItems> gbEveningTextArray = new ArrayList<FoodItems>();

    public static synchronized GBEveningText getSingletonObject() {
        if (gbEveningTextObj == null) {
            gbEveningTextObj = new GBEveningText();
        }
        return gbEveningTextObj;
    }

    public Object clone() throws CloneNotSupportedException {
        throw new CloneNotSupportedException();
    }

    public String getGBEveningText(String fileLoc) {

        String fileName = "";

        MenuRead menuReadObj = new MenuRead();
        gbEveningTextArray = menuReadObj.ReadMenu(Constants.GREAT_BRITAN);
        
        MenuGenerate menuGenerateObj = new MenuGenerate();
        gbEveningTextArray = menuGenerateObj.GenerateMenu(gbEveningTextArray, Constants.EVENING_ONLY);

        MenuFormat menuFormatObj = new MenuFormat();
        fileName = menuFormatObj.FormatMenu(gbEveningTextArray, Constants.TEXT, fileLoc);
        return fileName;

    }
}
